package com.xhwl.data.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xhwl.common.pojo.cent.sdata.ProjectPermission;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description: 项目与权限关联
 * @author: lianghz
 * @create: 2020-11-25
 **/
@RestController
public interface IProjectPermissionService extends IService<ProjectPermission> {

    @RequestMapping(value = "/project-permission-service/save",method = RequestMethod.POST)
    void save(@RequestPart("projectId") Integer projectId,@RequestPart("permissionIdList") List<Integer> permissionIdList);

    @RequestMapping(value = "/project-permission-service/list",method = RequestMethod.POST)
    List<Integer> list(@RequestPart("projectIdList") List<Integer> projectIdList);

    void deleteProjectPermission(List<Integer> projectIdList, List<Integer> permissionIdList);

    List<Integer> getProjectIdByPermissionId(List<Integer> permissionIdList);

    List<ProjectPermission> getListGroupByProject(List<Integer> projectIdList);

    void deleteBatchByProjectId(Integer projectId, List<Integer> permissionIdList);

    List<ProjectPermission> getList(List<Integer> projectIdList, List<Integer> permissionIdList);

}
